package bist.believeinstep.logic;

import java.util.List;

import bist.believeinstep.domain.Menu;
import bist.believeinstep.impl.MenuTemplate;
import bist.believeinstep.util.Util;

public class MenuService {
	private MenuTemplate menuTemplate;
	public MenuService(){
		menuTemplate = (MenuTemplate)Util.getConnection("menuTemplate");
	}
	
	public void create(Menu menu){
		menuTemplate.create(menu);
	}
	public void update(Menu menu){
		menuTemplate.update(menu);
	}
	public void delete(Integer id){
		menuTemplate.delete(id);
	}
	public Menu getMenu(Integer id){
		return menuTemplate.getMenu(id);
	}
	public Menu getMenu(String name){
		return menuTemplate.getMenu(name);
	}
	public List<Menu>list(){
		return menuTemplate.list();
	}
}
